const { defineConfig } = require('@vue/cli-service')
const webpack = require("webpack");
module.exports = defineConfig({
  outputDir:'hzh',
  publicPath:'/hzh',
  assetsDir:'static',
  lintOnSave:false,
  transpileDependencies: true,
  runtimeCompiler:true,
  configureWebpack:{
    plugins: [
      new webpack.ProvidePlugin({
        $: 'jquery',
        jQuery: 'jquery',
        'window.jQuery': 'jquery',
        Popper: ['popper.js', 'default']
      })
    ]
  },
  configureWebpack: config => {
    // 为生产环境修改配置...
    if (process.env.NODE_ENV === 'production') {
      config.mode = 'production';
      // 打包文件大小配置
      config.performance = {
        maxEntrypointSize: 10000000,
        maxAssetSize: 30000000
      }
    }
  },
  css:{
    loaderOptions:{
      less:{
        lessOptions: {
          javascriptEnabled: true,
        }
      }
    }
  },
  devServer:{
    open:true,
    port:8001,
    proxy:{
      '/test/':{
        target:'http://point.gene.ac/test/',
        changeOrigin:true,
        ws:false,
        pathRewrite:{
          '^/test/':''
        }
      },
    }
  }
})
